{% load i18n resources_custom_tags %}
    <fieldset>
    {% for field in form %}
        <div class="fieldWrapper {{ field.css_classes }}">
            {% if field|is_checkbox %}
                <label for="{{ field.html_name }}" class="checkbox {{ field.css_classes }}">
                    {{ field.label }}
                    {% if field.errors %}
                    <div class="alert alert-error">
                    {{ field.errors }}
                    </div>
                    {% endif %}
                    <input type="checkbox" id="{{ field.html_name }}" name="{{ field.html_name }}" {% if field.value %}checked="checked"{% endif %} />
                </label>
            {% else %}
                {{ field.label_tag }}
                {% if field.errors %}
                <div class="alert alert-error">
                    {{ field.errors }}
                </div>
                {% endif %}
                {{ field }}
            {% endif %}
            <span class="help-block"><i>{{ field.help_text }}</i></span>
        </div>
    {% endfor %}
    </fieldset>

{% block extrajs %}
    <style>
        .fieldWrapper{
            margin-bottom: 0.75rem;
        }
    </style>
{% endblock %}